fix(mysql): quote groups reserved word in query replacer#4580
Merged
Conversation
`groups` is a reserved word in MySQL >= 8.0.2, causing migration 13 to fail with a syntax error on `ALTER TABLE password ADD COLUMN groups`. Fixes dexidp#4579 Signed-off-by: Michiel De Backker <mail@backkem.me>
7580396 to
02d27c9
Compare
Contributor
Author
|
cc @nabokihms . IDK if you're open to cutting a patch release for something like this? |
Member
|
Thanks, we will wait a little longer for the other bugs and then release a patch. |
nabokihms
pushed a commit
to deckhouse/3p-dex
that referenced
this pull request
Mar 3, 2026
`groups` is a reserved word in MySQL >= 8.0.2, causing migration 13 to fail with a syntax error on `ALTER TABLE password ADD COLUMN groups`. Fixes dexidp#4579 Signed-off-by: Michiel De Backker <mail@backkem.me>
xtremerui
pushed a commit
to concourse/dex
that referenced
this pull request
Mar 19, 2026
<!-- Release notes generated using configuration in .github/release.yml at v2.45.x --> ### Bug Fixes 🐛 - Quote `groups` reserved word in query replacer to fix MySQL 8.0+ storage migration (dexidp#4580) - Update `authproxy` and `oauth` to match CallbackConnector interface (dexidp#4589) **Full Changelog**: dexidp/dex@v2.45.0...v2.45.1
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4579
groupsis a reserved word in MySQL >= 8.0.2. Migration 13 (from #4456) fails with:Additionally, since MySQL auto-commits DDL, statement 1 (
preferred_username) is persisteddespite the transaction rollback, leaving the migration in an unrecoverable state on restart.
Fix
Add
groupsto the existing reserved word quoting regex inflavorMySQL.queryReplacers,alongside
keyswhich is already handled.Recovery
Users stuck with a half-applied migration 13 need to drop the orphaned column before restarting: